<template>
  <div class="feed__attachment">
    <div class="feed__attachment__block" v-if="!loginState"></div>
    <div class="feed__attachment__block" v-else>
      <img
        src="https://s1.royole.com/ufs/templates/royole/assets/images/home/swiper/5.jpg"
        mode="widthFix center"
        class="feed__attachment__block__img"
        alt=""
      />
    </div>
    <div class="feed__attachment__title">这是柔宇的圈子</div>
    <div class="feed__attachment__sub-title">
      <img
        class="feed__attachment__sub-title__left"
        src="../../assets//images/icons/icon_notice.png"
        mode="center widthFix"
      />
      <div class="feed__attachment__sub-title__right">官方入住</div>
    </div>
    <div class="feed__attachment__bottom">加入</div>
  </div>
</template>
<script>
import { mapState } from "vuex";

export default {
  name: "Attachment",
  data() {
    return {};
  },
  computed: {
    ...mapState(["loginState"]),
  },
};
</script>

<style scoped lang="scss">
.feed__attachment {
  padding: 40px 0;
  width: 376px;
  height: 344px;
  background: $color-background;
  .feed__attachment__block {
    margin: 40px auto 24px;
    height: 88px;
    width: 88px;
    background: #d6e3ff;
    border-radius: 8px;
    &__img {
      width: 100%;
      height: 100%;
      border-radius: 8px;
    }
  }
  &__title {
    text-align: center;
    height: 26px;
    line-height: 26px;
    font-weight: 500;
    font-size: 18px;
  }
  &__sub-title {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    &__left {
      width: 16px;
      height: 16px;
      margin-right: 3px;
    }
    &__right {
      opacity: 0.6;
      font-weight: 500;
    }
  }
  &__bottom {
    margin: 0 auto;
    width: 120px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    color: #ffffff;
    background: #0050ff;
    border-radius: 20px;
  }
}
</style>
